package datastructurelike;

public class TreeNode {
       public int val = 0;
       public TreeNode left = null;
       public TreeNode right = null;
       public TreeNode(int x){
              val = x;
              left =left;
              right=right;

       }


       public int getVal() {
              return val;
       }

       public void setVal(int val) {
              this.val = val;
       }

       public TreeNode getLeft() {
              return left;
       }

       public void setLeft(TreeNode left) {
              this.left = left;
       }

       public TreeNode getRight() {
              return right;
       }

       public void setRight(TreeNode right) {
              this.right = right;
       }
}